package com.central.scheduler.dao.mapper;

import com.central.db.mapper.SuperMapper;
import com.central.scheduler.dao.model.ProWorker;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

/**
 * @author Tindy
 * @date 2021/7/5
 * @describe
 */
@Mapper
public interface ProWorkerMapper extends SuperMapper<ProWorker> {
    @Select("select pro_id from sch_pro_worker where worker_id=#{workerId}")
    List<Long> getProIds(@Param("workerId") Long workerId);

    @Select("select worker_id from sch_pro_worker where pro_id=#{proId}")
    Set<Long> getIdsByProId(@Param("proId") Long proId);
}